<!DOCTYPE html>
<html>
<head>
	<title>新增/修改节点字段设置</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/min.css" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/content/style.css" />

	<!-- jQuery AND jQueryUI -->
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jquery/1.6/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/content/main.js"></script>
</head>
<body>
<!-- CONTENT -->
<div id="content" class="white">

  <div class="bloc">
    <div class="title">
		<?php
			if(I('get.id')){
				echo '编辑';
			}else{
				echo '新增';
			}
		?>请求
		<?php
			if($cnode[type]==0){ echo '--创建';}else
			if($cnode[type]==1){ echo '--提交';}else
			if($cnode[type]==2){ echo '--归档';}
		?>
	</div>
    <form method="post" action="editOperation">
		<?php
			$id = I('get.id');
			$workflowid = I('get.workflowid');
			if($id){
				echo "<input type='hidden' name='id' value='".$id."'/>";
			}
			if($workflowid){
				echo "<input type='hidden' name='workflowid' value='".$workflowid."'/>";
			}
		?>
    	<input name="workflowid" type="hidden" value="{$workflowid}"/>
    <div class="content">
      <div class="input">
			<div class="input">
				<label class="label">请求名称:</label>
				<?php
					if($object_currentnode[type]!=0){
						echo "<span>".$object[name]."</span><input name='name' type='hidden' value='".$object[name]."'/>";
					}else{
						echo "<input name='name' value='".$object[name]."' 'readonly=readonly' />";
					}
				?> 
			</div>
	    	<div style="background-color:#B0C4DE">
	          	<volist name='fieldList' id='vo'>
	          		<?php 
	          			if(count($rwList)==0){
					?>
						<div>
							<label class="label">{$vo.fieldname}:</label>
							<input name='{$vo[dbname]}' value='{$object_fm[$vo[dbname]]}' type='hidden'/>
							<span>{$object_fm[$vo[dbname]]}</span>
						</div>
					<?php
						}
	          		?>
					<volist name='rwList' id='vo2'>
						<?php
							if($vo[id]==$vo2[formfieldid]){ ?>
								<?php
								if($vo2[readwrite]==0){ ?>
									<div>
										<label class="label">{$vo.fieldname}:</label>
										<input name='{$vo[dbname]}' value='{$object_fm[$vo[dbname]]}' type='hidden'/>
										<span>{$object_fm[$vo[dbname]]}</span>
									</div>
							<?php }else if($vo2[readwrite]==1){ ?>
									<div>
										<label class="label">{$vo.fieldname}:</label>
										<input name='{$vo[dbname]}' value='{$object_fm[$vo[dbname]]}'/>
									</div>
							<?php }else if($vo2[readwrite]==2){ ?>
										<input name='{$vo[dbname]}' value='{$object_fm[$vo[dbname]]}' type='hidden'/>
							<?php }
								break;
							}
						?>
					</volist>
	         	</volist>
	    	</div>
		<?php
			 if($object_currentnode[type]!=2){
		?>
			<div class="input">
				<label class="label">签字意见:</label>
				<textarea name="remark" style="width: 80%" value="{$qzobj[remark]}">{$qzobj['remark']}</textarea>
			</div>
		<?php
			}
		?>
          	<volist name='qzList' id='vo'>
				<div class="input">
					<label class="label">{$vo.nname}({$vo.uname}):</label>
					<span style="width: 80%">{$vo.remark}</span>
				</div>
         	</volist>
      </div>
      <div class="submit">
        <?php 
        	if($id){
				if($object_currentnode[type]==0||$object_currentnode[type]==1){
					echo "<input onclick=pushCommit('save') style='float:left' value='保存' class='black'/>";
					echo "<input onclick=pushCommit('submit') style='float:left' value='提交' class='black'/>";
				}
			}else{
				echo "<input onclick=pushCommit('save') style='float:left' value='保存' class='black'/>";
				echo "<input onclick=pushCommit('submit') style='float:left' value='提交' class='black'/>";
			}
        ?>
      </div>
    </div>
    <input type="hidden" name="method" value="0"/>
    </form>
  </div>
</div>
<script>
	function pushCommit(method){
		jQuery("input[name=method]:last").val(method);
		jQuery("form:first").submit();
	}
</script>
</body>
</html>